When the javascript effects are enabled, the 'Create related content' local task just opens a sub-menu (using js!) to create all the related content.

The feature is nice - the code less so. It finds the menu item to add the js behaviour to by looking at the href. This is obviously

  • Very inneficient;
  • and very unreliable

The code is like this :

$("a[href$=node/'.arg(1).'/nodereferrer_create_content]").click(function(event) {
  $("#nodereferrer-create-main-menu").'.$effect.';
  event.preventDefault();
});

Note from the implementer : I haven't been able to find a way to add a class/id to the menu item, which is why it's finding it this way. Maybe when js is enabled, it just shouldn't be a local task.